﻿<%@ Page Title="" Language="C#" MasterPageFile="~/homepaged.master" AutoEventWireup="true"
    CodeBehind="detaildomain.aspx.cs" Inherits="Nhom14_HTTTHD_BuyMe.detaildomain" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TopBanner" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div class="detail_headline">
          <table width="100%" cellspacing="0" cellpadding="0" border="0">
            <tbody>
                <tr>
                    <td>
                        <h2>
                            
                        </h2>
                    </td>
                    <td width="170">
                     
                    </td>
                    <td width="5">
                        &nbsp;
                    </td>
                    <td width="120">
                        
                    </td>
                </tr>
            </tbody>
        </table>
        <div style="padding-bottom: 7px;">
        </div>
    </div>
    <div class="inlister">
        <div style="padding-top: 40px;">
            <div class="inlister1">
                <asp:HyperLink ID="button_make_offer" CssClass="button_make_offer" runat="server" NavigateUrl="~/bid.aspx">Make an Offer</asp:HyperLink>
               <br />
               <asp:Label ID="Label2" runat="server" Text=""></asp:Label>
               
               <!-- <asp:Button ID="addtowatch" runat="server" Text="Add to watch list" 
                    onclick="addtowatch_Click" />-->
            </div>
            <div class="inlister2">
                
                <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1" 
                    onitemdatabound="DataList1_ItemDataBound">
                    <ItemTemplate>

                        <table class="outer" width="100%" cellspacing="0" cellpadding="5" border="0" style="margin: 0 0 10px 0;">
                    <tbody>
                        <tr class="filter1">
                            <td colspan="2">
                                Domain Profiles
                            </td>
                        </tr>
                        <tr class="hilite1">
                            <td width="150">
                                <b>Listed</b>
                            </td>
                            <td class="grid">
                               <%# Eval("date_started") %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>Category</b>
                            </td>
                            <td class="grid">
                                <%# Eval("name") %>
                            </td>
                        </tr>
                        <tr class="hilite1">
                            <td>
                                <b>Status</b>
                            </td>
                            <td class="grid">
                                <%# Eval("stats_available") %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>Page Views</b>
                            </td>
                            <td class="grid">
                                <%# Eval("page_view") %> (daily)
                            </td>
                        </tr>
                        <tr class="hilite1">
                            <td>
                                <b>Asking Price</b>
                            </td>
                            <td class="grid">
                                <%# "$" +Eval("asking_price") %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>URL</b>
                            </td>
                            <td class="grid">
                                <a rel="nofollow" target="_blank" href='<%# Eval("domain_url") %>'><%# Eval("domain_url") %></a>
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td><asp:Label ID="premiere" Visible="false" CssClass="icon_premiere_full" runat="server" Text=""></asp:Label></td>
                        </tr>
                    </tbody>
                </table>

                    </ItemTemplate>
                </asp:DataList>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:WebsitebrokenConnection %>" 
                    SelectCommand="SELECT TOP (1) domain.date_started, category.name, domain.domain_url, domain.description, domain.page_view, domain.asking_price, domain.stats_available, domain.timestamp,domain.id_type FROM domain INNER JOIN domain_category ON domain.id = domain_category.id_domain INNER JOIN category ON domain_category.id_category = category.id WHERE (domain.id = @id)">
                    <SelectParameters>
                        <asp:QueryStringParameter DefaultValue="0" Name="id" QueryStringField="id" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </div>
        </div>
        <div class="boxclear">
        </div>
    </div>

    <h3>Bids for this domain</h3>
    <br />
    
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:WebsitebrokenConnection %>" 
        SelectCommand="SELECT domain.id, domain.domain_url, domain.date_started, COUNT(bid_domain.id_domain) AS Expr1 FROM bid_domain INNER JOIN domain ON bid_domain.id_domain = domain.id WHERE (domain.id = @id) GROUP BY domain.id, domain.domain_url, domain.date_started">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="0" Name="id" QueryStringField="id" />
        </SelectParameters>
    </asp:SqlDataSource>

    <asp:DataList ID="DataList3" runat="server" DataSourceID="SqlDataSource3" 
        onitemdatabound="DataList3_ItemDataBound" CellPadding="4" 
        ForeColor="#333333">
        <AlternatingItemStyle BackColor="White" ForeColor="#284775" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <ItemStyle BackColor="#F7F6F3" ForeColor="#333333" Font-Size="Larger" />
        <ItemTemplate>
            <asp:Label ID="Label1" runat="server" Text="Date Times: " ForeColor="#000066" Font-Bold="True"></asp:Label>
            <asp:Label ID="timestampLabel" runat="server" Text='<%# Eval("timestamp") %>' />
            <br />
            
             <asp:Label ID="Label3" runat="server" Text="Price:" ForeColor="#000066" Font-Bold="True"></asp:Label>
            <asp:Label ID="priceLabel" runat="server" Text='<%# Eval("price") %>' ForeColor="#3366CC" />
            <br />
            
             <asp:Label ID="Label4" runat="server" Text="Price: " ForeColor="#000066" Font-Bold="True"></asp:Label>
            <asp:Label ID="messageLabel" runat="server" Text='<%# Eval("message") %>' />
            <br />
           
            <asp:Label ID="Label5" runat="server" Text="User Bid: " ForeColor="#000066" Font-Bold="True"></asp:Label>
            <asp:Label ID="usernameLabel" runat="server" Text='<%# Eval("username") %>' />
             <br />
            <asp:Button ID="btnLogBid" runat="server" CommandArgument='<%# Eval("id") %>' 
                Text="Create transaction" onclick="btnLogBid_Click" ForeColor="#000066" Font-Bold="True" />
            <br />
          <asp:Label ID="Label6" runat="server" Text=".........................................................................................................................................................." ForeColor="#000066" Font-Bold="True"></asp:Label>
        </ItemTemplate>
        <SelectedItemStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
    </asp:DataList>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
        ConnectionString="<%$ ConnectionStrings:WebsitebrokenConnection %>" 
        
        SelectCommand="SELECT bid_domain.timestamp, bid_domain.price, bid_domain.message, account.username, bid_domain.id FROM bid_domain INNER JOIN account ON bid_domain.id_account = account.id WHERE (bid_domain.id_domain = @id)">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="0" Name="id" QueryStringField="id" />
        </SelectParameters>
    </asp:SqlDataSource>

</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="SidebarContent" runat="server">
  
    <div class="account">
        <h2>
            My Account</h2>
        <ul>
            <li><a href="myhomepage.aspx">My Websites-Domain</a></li>
            <li><a href="mybid.aspx">My Bibs</a></li>
            <li><a href="mytransaction.aspx">My Transaction</a></li>
            <li><a href="mymessage.aspx">My Messages</a></li>
        </ul>
    </div>
</asp:Content>
